﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nancy;

namespace nwrole.SuperModule.service
{
    public class StatusModule : NancyModule
    {
        public StatusModule()
        {
            Get["/status"] = _ => View["status", 5];
        }
    }

    public class NancyPathProvider : IRootPathProvider
    {
        public string GetRootPath()
        {
            return WebPipeline.IsDevelopment() ? System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\") : AppDomain.CurrentDomain.BaseDirectory;
        }
    }

    public class NancyBootstrapper : DefaultNancyBootstrapper
    {
        protected override IRootPathProvider RootPathProvider
        {
            get
            {
                return new NancyPathProvider();
            }
        }
    }
}
